package com.qf.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.api.JifenApi;
import com.qf.Jifen;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @author MI
 * @ClassName OrderService.java
 * @createTime 2021年12月19日 11:05:00
 */
@Slf4j
@Service
public class OrderService {

    @Autowired
    JifenApi jifenApi;

    @SentinelResource("saveOrder[jifen]")
    public String saveOrder() {
        System.out.println("订单保存成功");
        Map save = jifenApi.save(new Jifen(1, 12, "12"));
        System.out.println(save);
        return "成功";
    }

}
